package com.weitu.emergency.controller;

import com.weitu.base.controller.BaseController;
import com.weitu.emergency.entity.TeamAndRegion;
import com.weitu.emergency.entity.TeamAndUser;
import com.weitu.emergency.service.TeamAndUserService;
import com.weitu.permission.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author zhangqingxi 2017/5/23
 */
@Controller
@RequestMapping("emergency/teamAndUser")
public class TeamAndUserController extends BaseController {

    private final TeamAndUserService teamAndUserService;

    @Autowired
    public TeamAndUserController(TeamAndUserService teamAndUserService) {
        this.teamAndUserService = teamAndUserService;
    }

    @ResponseBody
    @RequestMapping("/findByTeamId")
    public List<TeamAndUser> findByTeamId(String emergencyTeamId, String userType) {
        return teamAndUserService.findByTeamId(emergencyTeamId,userType);//获取总数

    }

}
